using FarmerJoe.Settings;
using Styx;

namespace FarmerJoe.Helpers
{
    public static class ClassParser
    {
        public static bool CCControlledMovement
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case  WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.CCControlledMovement.Contains("always");

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.CCControlledMovement.Contains("always");

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.CCControlledMovement.Contains("always");

                    default:
                        return true;
                }
            }
        }

        public static bool AllowLagTollerance
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.AllowLagTollerance.Contains("always");

                    case WoWClass.Priest:
                        return FpswareSettings.Instance.Priest.AllowLagTollerance.Contains("always");

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.AllowLagTollerance.Contains("always");

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.AllowLagTollerance.Contains("always");

                    default:
                        return false;
                }
            }
        }

        public static bool CCControlledTargeting
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.CCControlledTargeting.Contains("always");

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.CCControlledTargeting.Contains("always");

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.CCControlledTargeting.Contains("always");

                    default:
                        return true;
                }
            }
        }

        public static bool ForceFacingTarget
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.ForceFacingTarget.Contains("always");

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.ForceFacingTarget.Contains("always");

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.ForceFacingTarget.Contains("always");

                    default:
                        return true;
                }
            }
        }

        public static int RestHealth
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.RestHealth;

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.RestHealth;

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.RestHealth;

                    default:
                        return 0;
                }
            }
        }

        public static int RestMana
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.RestMana;

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.RestMana;

                    default:
                        return 0;
                }
            }
        }

        public static int HealthPotion
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.HealthPotionHealth;

                    case WoWClass.Hunter:
                        return FpswareSettings.Instance.Hunter.HealthPotionHealth;

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.HealthPotionHealth;

                    default:
                        return 0;
                }
            }
        }

        public static int ManaPotion
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.ManaPotionMana;

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.ManaPotionMana;

                    default:
                        return 0;
                }
            }
        }

        public static bool UseTTD
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return FpswareSettings.Instance.Druid.TimeToDeathCheck.Contains("always");

                    case WoWClass.Warlock:
                        return FpswareSettings.Instance.Warlock.TimeToDeathCheck.Contains("always");

                    default:
                        return true;
                }
            }
        }

        public static bool Trinket1
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return CLC.ResultOK(FpswareSettings.Instance.Druid.Trinket1);

                    case WoWClass.Hunter:
                        return CLC.ResultOK(FpswareSettings.Instance.Hunter.Trinket1);


                    case WoWClass.Warlock:
                        return CLC.ResultOK(FpswareSettings.Instance.Warlock.Trinket1);

                    default:
                        return true;
                }
            }
        }

        public static bool Trinket2
        {
            get
            {
                switch (StyxWoW.Me.Class)
                {
                    case WoWClass.Druid:
                        return CLC.ResultOK(FpswareSettings.Instance.Druid.Trinket2);

                    case WoWClass.Hunter:
                        return CLC.ResultOK(FpswareSettings.Instance.Hunter.Trinket2);

                    case WoWClass.Warlock:
                        return CLC.ResultOK(FpswareSettings.Instance.Warlock.Trinket2);

                    default:
                        return true;
                }
            }
        }
    }
}